home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-04-02 | 2.7 KB | 65 lines | [TEXT/CCL2] |
- ; grow-icon-source-patch.lisp
- ; This source patch is included in the MCL 2.0b1 patch (.fasl) files. The
- ; following source patch is provided so that the source in the library file is
- ; consistent with the behavior of MCL 2.0b1p2.
-
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;
- ;; These are from library;scroll-bar-dialog-items.lisp
-
- (defmethod view-draw-contents ((item scroll-bar-dialog-item))
- (let ((handle (dialog-item-handle item)))
- (when handle
- (if (window-active-p (view-window item))
- (if (rref handle :control.vis)
- (_Draw1Control :ptr handle)
- (_ShowControl :ptr handle))
- (multiple-value-bind (tl br) (scroll-bar-and-splitter-corners item)
- (rlet ((rect :rect :topLeft tl :botRight br))
- (_FrameRect :ptr rect)))))))
-
- (defun scroll-bar-and-splitter-corners (scroll-bar)
- (multiple-value-bind (tl br) (view-corners scroll-bar)
- (let ((splitter (pane-splitter scroll-bar)))
- (if splitter
- (multiple-value-bind (stl sbr) (view-corners splitter)
- (values (make-point (min (point-h tl) (point-h stl))
- (min (point-v tl) (point-v stl)))
- (make-point (max (point-h br) (point-h sbr))
- (max (point-v br) (point-v sbr)))))
- (values tl br)))))
-
-
- (defmethod view-deactivate-event-handler ((item scroll-bar-dialog-item))
- (with-focused-view (view-container item)
- (let ((handle (dialog-item-handle item)))
- (unless (window-active-p (view-window item))
- (multiple-value-bind (tl br) (scroll-bar-and-splitter-corners item)
- (rlet ((rect :rect
- :topLeft (add-points tl #@(1 1))
- :botRight (subtract-points br #@(1 1))))
- (with-clip-rect rect
- (_HideControl :ptr handle)
- (_EraseRect :ptr rect)))))
- (_hilitecontrol :ptr handle :word 255))))
-
- (defmethod view-activate-event-handler ((item scroll-bar-dialog-item))
- (when (let ((w (view-window item)))
- (and w (window-active-p w)))
- (let ((handle (dialog-item-handle item)))
- (with-focused-view (view-container item)
- (when (dialog-item-enabled-p item)
- (_hilitecontrol :ptr handle :word 0))
- (unless (rref handle :control.vis)
- (_ShowControl :ptr handle)
- (let ((splitter (pane-splitter item)))
- (when splitter (view-draw-contents splitter))))))))
-
- (defmethod view-draw-contents ((item pane-splitter))
- (when (window-active-p (view-window item))
- (let* ((tl (view-position item))
- (br (add-points tl (view-size item))))
- (rlet ((r :rect :topleft tl :botright br))
- (_FillRect :ptr r :ptr *black-pattern*)))))
-